﻿using AutoMapper;
using EasyI18n.Api.Infrastructure.DataPersistence.MongoDb.Entities;
using EasyI18n.Api.Primary.Bases;
using EasyI18n.Api.Primary.Contracts.Bases;
using Mediator.Net.Contracts;

namespace EasyI18n.Api.Primary.Contracts.Users;

public interface IRegisterUserContract : ICommandContract<RegisterUserCommand>;

public class RegisterUserCommand : ICommand, IMapFrom<SystemUser>
{
    public string UserName { get; set; }
    
    public string Password { get; set; }
    
    public void ConfigureMapper(IMapperConfigurationExpression cfg, SystemUser? source)
    {
        this.CreateMapperConfiguration(cfg, source).ReverseMap();
    }
}